package com.bifrost.service;

import com.alibaba.fastjson.JSONObject;
import com.bifrost.model.cbmember.JudgeReturnRequest;

import java.util.Map;

/**
 * @author rangf
 * @date 2018/3/9
 */
public interface MemberService {


    /**
     * 获取会员信息
     *<p>
     * {
     "errCode": "0",
     "errMessage": "成功",
     "data": {
     "id": "53726",
     "rentid": "1",
     "weid": "12",
     "openid": "oYItnuGsROhi7hu2Np33fHYh01z8",
     "cardtype": "WX03",
     "cardno": "WX0300005698",
     "username": "会员姓名",
     "jfye": "1051",
     "jftotal": null,
     "jfxf": null,
     "jfsign": null,
     "xfje": null,
     "tel": "18896012345",
     "birthday": null,
     "address": null,
     "sex": null,
     "email": null,
     "status": null,
     "remark": null,
     "modifydate": null,
     "inputdate": "27-9月 -15",
     "validdate": null,
     "islink": null,
     "linksource": null,
     "linkid": null,
     "roleid": null,
     "kfid": null,
     "kkstore": null,
     "issend": null,
     "sendtime": null,
     "password": null,
     "hisjfye": null,
     "idtype": null,
     "idno": "510213198403036133",
     "servermkt": null,
     "issendcard": null,
     "cdmchr1": null,
     "cdmchr2": null,
     "cdmchr3": null,
     "cdmchr4": null,
     "cdmchr5": null,
     "cdmnum1": "0",
     "cdmnum2": null,
     "cdmnum3": null,
     "cdmnum4": null,
     "cdmnum5": null,
     "cdmdate1": null,
     "cdmdate2": null,
     "cdmdate3": null,
     "cardtrack": null,
     "mcardno": null,
     "age": null,
     "sexnew": null,
     "numrow": "1"
     }
     }
     * </p>
     * @param openId
     * @return
     */
    public JSONObject getMemberInfo(String openId);

    /**
     * 获取动态会员卡
     *
     * @param openId
     * @return
     */
    public String getMemberCard(String openId);

    /**
     * 退货判断接口：返回差异积分
     *
     * @param judgeReturnRequest
     * @return
     */
    public String getReturnScore(JudgeReturnRequest judgeReturnRequest);

    /**
     * 退货判断接口：返回差异积分
     *
     * @param returnId
     * @return
     */
    public String getReturnScoreForAdmin(Long returnId);

    /**
     * 发送消费信息到积分系统
     * @param msg
     * @return
     */
    public JSONObject sendSales(Map msg);

    /**
     * 会员系统发送验证短信
     * @param method
     * @param openId
     * @param mobile
     * @param idNum
     * @param ppid
     * @return
     */
    public JSONObject sendSms(String method,String openId,String mobile,String idNum,int ppid);


    /**
     * 注册crm会员
     * @param method CreateCard
     * @param openId
     * @param name
     * @param mobile
     * @param idNum
     * @param verifyCode
     * @param publicid
     * @param ppid
     * @return
     */
    public JSONObject register(String method,String openId,String name,String mobile,String idNum,String verifyCode,int publicid,int ppid );

    /**
     * 绑定crm会员卡
     * @param method BindCard
     * @param openId
     * @param mobile
     * @param idNum
     * @param verifyCode
     * @param cardno
     * @param publicid
     * @param ppid
     * @return
     */
    public JSONObject bind(String method,String openId,String mobile,String idNum,String verifyCode,String cardno,int publicid,int ppid );

}
